package com.dsjy.yf.address.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsjy.yf.address.entity.dataobject.YardRoadDO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author whj
 * @version 1.0
 * @date 2021-01-15 9:43
 */
public interface YardRoadMapper extends BaseMapper<YardRoadDO> {


    /**
     * 根据院落id查找院内道路对象
     *
     * @param parentCode
     * @return
     */
    List<YardRoadDO> searchYardRoadWithParentCode(Integer parentCode, Boolean flag);

    /**
     * 增加院落内道路
     *
     * @param yardRoadDO
     * @return
     */
    Integer addYardRoad(@Param("yardRoadDO") YardRoadDO yardRoadDO);


    /**
     * 通过yard_id删除数据
     *
     * @param parentCode
     * @return
     */
    Integer delYardRoadByParentCode(Integer parentCode);


    /**
     * 修改更新
     *
     * @param yardRoadDO
     * @return
     */
    Integer updYarRoad(@Param("yardRoadDO") YardRoadDO yardRoadDO);
}
